
let getScrollTopPixel = function(foodType, scrollTop){
  if (foodType == 'mainFood'){
    if(scrollTop>=1912){
        return 4;
    } else if (scrollTop >= 1371){
      return 3;
    } else if (scrollTop >= 704) {
      return 2;
    } else if (scrollTop >= 289) {
      return 1;
    } else{
      return 0;
    }
  }

  if (foodType == 'milkAndEgg') {
    if (scrollTop >= 2327) {
      return 5;
    } else if (scrollTop >= 1912) {
      return 4;
    } else if (scrollTop >= 1497) {
      return 3;
    } else if (scrollTop >= 1082) {
      return 2;
    } else if (scrollTop >= 667) {
      return 1;
    } else {
      return 0;
    }
  }

  if (foodType == 'oil') {
    if (scrollTop >= 415) {
      return 1;
    } else {
      return 0;
    }
  }
}

export default {
  getScrollTopPixel: getScrollTopPixel
}
